import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking

fun main() {
    runBlocking {
        for (i in 1..20_000) {
            launch {
                var k = 1
                while (true) {
                    delay(1000)
                    println("$i >> ${k}")
                    k += 1
                }
            }
        }
    }
}

private fun thread1k() {
    for (i in 1..1000) {
        Thread({
            var k = 1
            while (true) {
                Thread.sleep(1000)
                println("$i >> ${k}")
                k += 1
            }
        }).start()
    }
}